Embedding analytics for third party views
Do the following to embed analytics for third party views:
-
Prerequisites: Ensure that the client provides the following:
-
Provide external auth API details:
-
API endpoint:
https://domain.com/oauth/authorize
-
Required request parameters (e.g.,
userId
andfilterColumnName
.) -
Required Headers:
Authorization
-
Method:
GET
-
Response Code:
-
401 Unauthorized
-
200 Authorized
-
-
-
Ensure the DataGOL server has access to the external auth API.
-
Provide necessary details for filters and authentication.
-
-
-
Data setup
-
Leverage the Lakehouse and Workbooks module on the DataGOL platform to organize your data models from different data sources into a workspace. Refer to Workspace.
-
Once the data is imported into the workspace, the data can be seen within the workbooks module in the workspace. Refer to Workbook.
-
Make sure the column’s type is set appropriately. This is very important as this could impact the BI capabilities of your data.
-
We recommend making these workbooks delete protected.
-
-
Dashboard setup
After you set up data, you set up the dashboard pages powered by the data present in the workbooks. Refer to Creating dashboards. -
Dashboard embedding setup
-
On the Dashboard, from the upper right corner, click settings and then choose Third Party Sharing. The Third Party Sharing box is displayed.
-
In the Third Party Sharing box, do the following:
-
Filter column: These are the columns that appear in every workbook you are using on the dashboard. You use these columns to control the data shown in the iframe.
Only one filter column is allowed at the moment. -
Hosts: The external website domain that will be used to embed and render the dashboard. The dashboards will be rendered only in these allowed hosts. Server to server authentication will be done against this domain.
appId
andpageId
could be found in the iframe link via Copy Link button. -
Auth URL: The URL where the client-to-client authentication will be initiated.
-
Auth Header Name: The name of the header which will be used to pass the auth token during the authentication.
-
Data Sharing Settings: Click the checkboxes to enable drill-down and raw data.
-
-
Toggle on Enable Embedding.
-
Click Copy Link. You can use this link to launch the embedded dashboard using iframe.
The iframe link to load the embedded Dashboard page must include:
-
URL Format:
https://app.datagol.ai/thirdParty/app/[appId]/page/[pageId]?userId=[userId]&authToken=[authToken]&filterColumnName=[filterColumValue]
-
Dynamic Parameters:
-
appId
: Application identifier provided by DataGOL. -
pageId
: Dashboard page identifier provided by DataGOL. (as you can have multiple pages) -
userId
is optional -
authToken
: Provided during rendering and will be validated via server-to-server Auth to ensure DataGOL can share this data using this filter to this user/company session. -
filterColumnName
: filter workbook data column
-
-
Sample iframe URL
https://datagol.ai/thirdParty/app/app_g253321/page/page_p232243?userId=user_L454322&authToken=dg35Aqwfwlt890&department=HR
-
External Auth Server Requirements
-
API Endpoint: At the client end you must set up the external auth API endpoint to validate the token so that DataGOL can release the data being asked.
-
Query Parameters:
-
userId
: Unique identifier for the user (Optional). -
filterColumnName
: Unique Identifier to filter the data from the workbooks
-
-
Request Headers:
X-Auth-Token
: Token is used for authentication and is sent during Iframe invocation. -
Sample API
curl -v -XGET -H X-Auth-Token: dg35Aqwfwlt890' 'https://domain.com/oauth/authorize?userId=user_L454322&department=HR'
[Best Practice]Do not use your system's internal user auth token. Use a separate authorization token for DataGOL as the token for the iframe will be passed through the URL.
-
-
-